// 引入defineStore用于创建store
import { defineStore } from "pinia";

// 定义并暴露一个store
export const useMapStore = defineStore("defineMap", {
  // 动作
  actions: {},
  // 状态
  state() {
    return {
      map: null,
      timer: 0, // 基本信息表格
      currentCar: "",
      basicInfoTableData: [],
      basicInfoTableTotal: 1,
      basicInfoTableCurrentPage: 1,
      basicInfoTablePageSize: 5,
      // 轨迹信息表格（当天）
      trajectoryTodayTableData: [],
      trajectoryTodayTableTotal: 0,
      trajectoryTodayTableCurrentPage: 1,
      trajectoryTodayTablePageSize: 5, 
      // 轨迹信息表格（当周）
      trajectoryWeekTableData: [],
      trajectoryWeekTableTotal: 0,
      trajectoryWeekTableCurrentPage: 1,
      trajectoryWeekTablePageSize: 5,  
      // 轨迹信息表格（当月）
      trajectoryMonthTableData: [],
      trajectoryMonthTableTotal: 0,
      trajectoryMonthTableCurrentPage: 1,
      trajectoryMonthTablePageSize: 5,
    };
  },
  // 计算
  getters: {}
});
